package com.dragon.modules.yuegou.query.merchant;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.merchant.MerchantQrcodeEntity;
import com.dragon.modules.yuegou.enums.merchant.MerchantQrcodeStatus;
import com.dragon.modules.yuegou.enums.merchant.MerchantQrcodeType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 商户停车券二维码表 动态查询条件
 *
 * @author pbuilder generated
 * @date 2021-05-11 17:09:46
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MerchantQrcodeQuery extends MerchantQrcodeEntity implements Query<MerchantQrcodeEntity>{

	/** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

	/** [枚举]状态：0-停车券-PARK、1-商品券-PRODUCT、2-优惠券-COUPON查询条件 */
	@JsonUnwrapped(prefix = "type")
	private Condition<MerchantQrcodeType> typeCondition;

	/** 商户ID查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

	/** 商户申请券批次ID查询条件 */
	@JsonUnwrapped(prefix = "merchantCouponId")
	private Condition<String> merchantCouponIdCondition;

	/** 二维码图片地址查询条件 */
	@JsonUnwrapped(prefix = "qrcodeUrl")
	private Condition<String> qrcodeUrlCondition;

	/** [枚举]状态：0-未领取-READY、1-已领取-RECEIVE、2-未扫码-NOSCAN、3-已扫码-SCAND查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<MerchantQrcodeStatus> statusCondition;

	/** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/** 创建人查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

	/** 更新时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

	/** 更新人查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

	/** 二维码链接地址查询条件 */
	@JsonUnwrapped(prefix = "linkUrl")
	private Condition<String> linkUrlCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MerchantQrcodeQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 *
	 * @param entity 实体对象
	 */
	public MerchantQrcodeQuery(MerchantQrcodeEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 *
	 * @param other 查询条件对象
	 */
	public MerchantQrcodeQuery(MerchantQrcodeQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.typeCondition != null) {
			this.typeCondition = other.typeCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.merchantCouponIdCondition != null) {
			this.merchantCouponIdCondition = other.merchantCouponIdCondition.copy();
		}
		if(other.qrcodeUrlCondition != null) {
			this.qrcodeUrlCondition = other.qrcodeUrlCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
		if(other.linkUrlCondition != null) {
			this.linkUrlCondition = other.linkUrlCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MerchantQrcodeEntity> toQueryWrapper() {
		QueryWrapper<MerchantQrcodeEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (typeCondition != null) {
			typeCondition.toWrapper(wrapper, COL_TYPE);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (merchantCouponIdCondition != null) {
			merchantCouponIdCondition.toWrapper(wrapper, COL_MERCHANT_COUPON_ID);
		}
		if (qrcodeUrlCondition != null) {
			qrcodeUrlCondition.toWrapper(wrapper, COL_QRCODE_URL);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		if (linkUrlCondition != null) {
			linkUrlCondition.toWrapper(wrapper, COL_LINK_URL);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 *
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}

	/**
	 * 获取查询条件
	 *
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 *
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回[枚举]状态：0-停车券-PARK、1-商品券-PRODUCT、2-优惠券-COUPON查询条件
	 *
	 * @return typeCondition [枚举]状态：0-停车券-PARK、1-商品券-PRODUCT、2-优惠券-COUPON查询条件
	 */
	public Condition<MerchantQrcodeType> type() {
		this.typeCondition = new Condition<>();
		return this.typeCondition;
	}

	/**
	 * 获取[枚举]状态：0-停车券-PARK、1-商品券-PRODUCT、2-优惠券-COUPON查询条件
	 *
	 * @return typeCondition [枚举]状态：0-停车券-PARK、1-商品券-PRODUCT、2-优惠券-COUPON查询条件
	 */
	public Condition<MerchantQrcodeType> getTypeCondition() {
		return typeCondition;
	}

	/**
	 * 设置[枚举]状态：0-停车券-PARK、1-商品券-PRODUCT、2-优惠券-COUPON查询条件
	 *
	 * @param typeCondition [枚举]状态：0-停车券-PARK、1-商品券-PRODUCT、2-优惠券-COUPON查询条件
	 */
	public void setTypeCondition(Condition<MerchantQrcodeType> typeCondition) {
		this.typeCondition = typeCondition;
	}

	/**
	 * 构造并返回商户ID查询条件
	 *
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}

	/**
	 * 获取商户ID查询条件
	 *
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID查询条件
	 *
	 * @param merchantIdCondition 商户ID查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回商户申请券批次ID查询条件
	 *
	 * @return merchantCouponIdCondition 商户申请券批次ID查询条件
	 */
	public Condition<String> merchantCouponId() {
		this.merchantCouponIdCondition = new Condition<>();
		return this.merchantCouponIdCondition;
	}

	/**
	 * 获取商户申请券批次ID查询条件
	 *
	 * @return merchantCouponIdCondition 商户申请券批次ID查询条件
	 */
	public Condition<String> getMerchantCouponIdCondition() {
		return merchantCouponIdCondition;
	}

	/**
	 * 设置商户申请券批次ID查询条件
	 *
	 * @param merchantCouponIdCondition 商户申请券批次ID查询条件
	 */
	public void setMerchantCouponIdCondition(Condition<String> merchantCouponIdCondition) {
		this.merchantCouponIdCondition = merchantCouponIdCondition;
	}

	/**
	 * 构造并返回二维码图片地址查询条件
	 *
	 * @return qrcodeUrlCondition 二维码图片地址查询条件
	 */
	public Condition<String> qrcodeUrl() {
		this.qrcodeUrlCondition = new Condition<>();
		return this.qrcodeUrlCondition;
	}

	/**
	 * 获取二维码图片地址查询条件
	 *
	 * @return qrcodeUrlCondition 二维码图片地址查询条件
	 */
	public Condition<String> getQrcodeUrlCondition() {
		return qrcodeUrlCondition;
	}

	/**
	 * 设置二维码图片地址查询条件
	 *
	 * @param qrcodeUrlCondition 二维码图片地址查询条件
	 */
	public void setQrcodeUrlCondition(Condition<String> qrcodeUrlCondition) {
		this.qrcodeUrlCondition = qrcodeUrlCondition;
	}

	/**
	 * 构造并返回[枚举]状态：0-未领取-READY、1-已领取-RECEIVE、2-未扫码-NOSCAN、3-已扫码-SCAND查询条件
	 *
	 * @return statusCondition [枚举]状态：0-未领取-READY、1-已领取-RECEIVE、2-未扫码-NOSCAN、3-已扫码-SCAND查询条件
	 */
	public Condition<MerchantQrcodeStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}

	/**
	 * 获取[枚举]状态：0-未领取-READY、1-已领取-RECEIVE、2-未扫码-NOSCAN、3-已扫码-SCAND查询条件
	 *
	 * @return statusCondition [枚举]状态：0-未领取-READY、1-已领取-RECEIVE、2-未扫码-NOSCAN、3-已扫码-SCAND查询条件
	 */
	public Condition<MerchantQrcodeStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]状态：0-未领取-READY、1-已领取-RECEIVE、2-未扫码-NOSCAN、3-已扫码-SCAND查询条件
	 *
	 * @param statusCondition [枚举]状态：0-未领取-READY、1-已领取-RECEIVE、2-未扫码-NOSCAN、3-已扫码-SCAND查询条件
	 */
	public void setStatusCondition(Condition<MerchantQrcodeStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 *
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}

	/**
	 * 获取创建时间查询条件
	 *
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 *
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回创建人查询条件
	 *
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}

	/**
	 * 获取创建人查询条件
	 *
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人查询条件
	 *
	 * @param createdByCondition 创建人查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回更新时间查询条件
	 *
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}

	/**
	 * 获取更新时间查询条件
	 *
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置更新时间查询条件
	 *
	 * @param modifiedTimeCondition 更新时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回更新人查询条件
	 *
	 * @return modifiedByCondition 更新人查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}

	/**
	 * 获取更新人查询条件
	 *
	 * @return modifiedByCondition 更新人查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置更新人查询条件
	 *
	 * @param modifiedByCondition 更新人查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

	/**
	 * 构造并返回二维码链接地址查询条件
	 *
	 * @return linkUrlCondition 二维码链接地址查询条件
	 */
	public Condition<String> linkUrl() {
		this.linkUrlCondition = new Condition<>();
		return this.linkUrlCondition;
	}

	/**
	 * 获取二维码链接地址查询条件
	 *
	 * @return linkUrlCondition 二维码链接地址查询条件
	 */
	public Condition<String> getLinkUrlCondition() {
		return linkUrlCondition;
	}

	/**
	 * 设置二维码链接地址查询条件
	 *
	 * @param linkUrlCondition 二维码链接地址查询条件
	 */
	public void setLinkUrlCondition(Condition<String> linkUrlCondition) {
		this.linkUrlCondition = linkUrlCondition;
	}

}
